<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
test(() => assert_selection(
    [
      '<div contenteditable>',
          'foo',
          '<table><tr><td>this</td></tr><tr><td>is</td></tr><tr><td>a table</td></tr></table>',
          'baz',
      '</div>'
    ].join(''),
    selection => selection.collapse(selection.document.querySelector('table'), 0),
    [
      '<div contenteditable>',
          'foo',
          '<table>|<tbody><tr><td>this</td></tr><tr><td>is</td></tr><tr><td>a table</td></tr></tbody></table>',
          'baz',
      '</div>'
    ].join('')), 'Place the caret before a block table.');
</script>
